<?php

use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;

class CreateTableTags extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('tags', function (Blueprint $table) {
            $table->integer('id')->autoIncrement();
            $table->string('name', 255)->nullable()->comment('名称');
            $table->string('description', 255)->nullable()->comment('描述');
            $table->bigInteger('used_count')->nullable()->comment('使用数');
            $table->tinyInteger('status')->default(1)->comment('状态');
            $table->char('active', 1)->default('1')->comment('是否激活');
            $table->boolean('is_delete')->default(0)->comment('是否删除');
            $table->timestamp('create_time')->nullable();
            $table->timestamp('update_time')->nullable();
            $table->timestamp('delete_time')->nullable();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('tags');
    }
}
